﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace SafeLoad.NControl
{
	/// <summary>
	/// NWarning.xaml 的交互逻辑
	/// </summary>
	public partial class NWarning : UserControl
	{
		public NWarning()
		{
			InitializeComponent();
		}

		public static readonly DependencyProperty BackColorProperty =
		  DependencyProperty.Register("BackColor", typeof(Color), typeof(NWarning), new PropertyMetadata(Colors.Transparent));
		/// <summary>
		/// 背景色
		/// </summary>
		public Color BackColor
		{
			get { return (Color)GetValue(BackColorProperty); }
			set { SetValue(BackColorProperty, value); }
		}

		public static readonly DependencyProperty BottomColorProperty =
		  DependencyProperty.Register("BottomColor", typeof(Color), typeof(NWarning), new PropertyMetadata(Colors.LightGray));
		/// <summary>
		/// 底座颜色
		/// </summary>
		public Color BottomColor
		{
			get { return (Color)GetValue(BottomColorProperty); }
			set { SetValue(BottomColorProperty, value); }
		}

		public static readonly DependencyProperty AlarmColorProperty =
		  DependencyProperty.Register("AlarmColor", typeof(Color), typeof(NWarning), new PropertyMetadata(Colors.Tomato));
		/// <summary>
		/// 报警状态颜色
		/// </summary>
		public Color AlarmColor
		{
			get { return (Color)GetValue(AlarmColorProperty); }
			set { SetValue(AlarmColorProperty, value); }
		}

		public static readonly DependencyProperty AlarmStateProperty =
			DependencyProperty.Register("AlarmState", typeof(int), typeof(NWarning), new PropertyMetadata(0));
		/// <summary>
		/// 报警状态
		/// </summary>
		public int AlarmState
		{
			get { return (int)GetValue(AlarmStateProperty); }
			set { SetValue(AlarmStateProperty, value); }
		}
	}
}
